package com.acoreful.sample.entity;
import static com.acoreful.sample.commons.GlobalConstants.DB_SCHEMA;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.acoreful.sample.commons.beans.BaseEntity;
@Entity 
@Table(name="tb_user",schema=DB_SCHEMA)
public class User extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8374406447623427733L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id",precision=20,scale=0, nullable = true, unique = true) 
	private Long id;
	@Column(name = "login_name",length=200)
	private String loginName;
	@Column(name = "nickname",length=200) 
	private String nickname;
	@Column(name = "name",length=100) 
	private String name;
	@Column(name = "password",length=100) 
	private String password;
	/**
	 * 
	 */
	@Column(name = "state",length=1) 
	private String state;
	@Temporal(TemporalType.DATE)
	@Column(name = "birthday")
	private Date birthday;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time",length=1) 
	private Date createTime;
	
	@Transient
	private String salt;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	

}
